import { App } from 'vue'
import Antd, { message } from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import * as antIcons from '@ant-design/icons-vue'

export function installAntdDesignUI (app:App) : void {
  app.use(Antd)
  // 注册组件icon
  Object.keys(antIcons).forEach((key : string) => {
    app.component(key, antIcons[key])
  })
  // 添加到全局
  app.config.globalProperties.$antIcons = antIcons
  app.config.globalProperties.$message = message
}
